package embyparse.tokenizer;

/**
 * A class representing a single token. A line number of -1 means that the token was not generated from a text file and thus cannot have a line number..
 * @author Justin
 *
 */
public class Token {

	String token;
	int lineNumber;
	public Token(String _token, int line){
		token = _token;
		lineNumber = line;
	}
	public Token(String _token){
		this(_token, -1);
	}

	public boolean equals(Token t){
		return t.token.equals(token);
	}

	public String toString(){
		return token;
	}

	public String getString(){
		return token;
	}

	public int line(){
		return lineNumber;
	}
}
